type #Login {
    nickname: String
};

type #Message {
    from:    String,
    content: #MessageContent
};

type #MessageContent {
    text: String
};

type #Service interface {
    say: rpc::Method[#MessageContent,()],
    receive-messages: rpc::Method*[(),#Message]
};
type #Service@Argument #Login;

export const ERR_KIND: String 'kind';
export const ERR_NAME_IN_USE: String 'name-in-use';

export const DefaultServerBackend: rpc::ServerBackend
    { rpc::ServerCleartext { network: 'tcp', addr: '127.0.0.1:8001' } };

export const DefaultClientBackend: rpc::ClientBackend
    { rpc::ClientCleartext { network: 'tcp', addr: '127.0.0.1:8001' } };


